﻿<html>
<head>
<script language="JavaScript">
function checkMobile(input) {
    var mobile_number = input.value;
    var mobile_rule = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
    var tip = document.getElementById("tip");
    if(mobile_number.match(mobile_rule) == null){
        tip.innerHTML = "请输入11位正确的手机号码！";
        return false;
    } else {
        tip.innerHTML = "输入正确";
    }
}
</script>
</head>
<body>
手机号码：<input type="text" onblur="checkMobile(this)" />
<span id="tip"></span>
</body>
</html>
